package com.yanzhu.service.impl;

import com.yanzhu.service.UserService;
import com.yanzhu.service.mapper.UserMapper;
import com.yanzhu.service.model.User;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @Author: 方炎柱
 * @Description:
 * @Date: Created in 9:57 2018/1/19
 * @Modified:
 */
@AllArgsConstructor
@Service
public class UserServiceImpl implements UserService {
    private UserMapper userMapper;

    @Override
    public int insert(User user) {
        return userMapper.insert(user);
    }

    @Override
    public User selectByOpenId(String openId) {
        return userMapper.selectByOpenId(openId);
    }

    @Override
    public void update(User user) {
        userMapper.update(user);
    }

    @Override
    public User queryUserInfo(long uid) {
        return userMapper.queryUserInfo(uid);
    }
}
